Skip to content

Fix undefined trackGaEvent and give row download buttons a busy state - #76

Merged
Jingxi-Polymaker merged 2 commits into
mainfrom
posthog/fix-banner-track-event-and-download-feedback
Sep 10, 2026
Merged

Fix undefined trackGaEvent and give row download buttons a busy state#76
Jingxi-Polymaker merged 2 commits into
mainfrom
posthog/fix-banner-track-event-and-download-feedback

Conversation

@posthog

@posthog posthog Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The LayerHub banner called an undefined tracking function, and row downloads gave no feedback while fetching or packaging files. This change routes the banner event through trackUsageEvent and gives JSON and .bbsflmt row buttons a busy state with repeat-click protection.

Bundle downloads now stay busy through mapping, confirmation dialogs, and ZIP generation. Completion, cancellation, and errors all clear the state; ZIP failures reach the download error handler. The action column has enough space for both buttons and busy indicators instead of clipping the bundle button. The spinner supports both themes and reduced motion.

Validation:

  • npm run test:all: 260 tests pass.
  • Behavioral regression tests execute the production bundle click handler and lifecycle, covering deferred ZIP completion, repeat clicks, cancellation, and fetch/mapping/ZIP failures.
  • Chromium desktop: paused ZIP generation to verify the busy indicator, then completed a real .bbsflmt download and validated its archive and all three JSON entries.
  • Chromium 375px wiki theme: bundle button click and cancellation restore the idle state.
  • JavaScript syntax, diff whitespace, and generated SEO consistency checks pass.

posthog Bot and others added 2 commits September 9, 2026 09:23
The LayerHub banner CTA called trackGaEvent, which is not defined anywhere
in the project, so every click threw a ReferenceError and the banner_explore
event was never recorded. Route it through trackUsageEvent like every other
event in app.js, which already swallows provider failures.

Row download buttons (JSON, BambuStudio JSON, .bbsflmt) fetch and sometimes
zip before the browser saves a file, with no feedback for the whole wait and
no guard against a repeat click. The bulk Download Selected / Download Bundle
buttons already disable themselves and show a loading label; the per-row ones
now get the equivalent through an is-busy class, aria-busy, and a spinner that
works in both themes and respects prefers-reduced-motion.


Generated-By: PostHog Desktop
Task-Id: bab76398-4c5b-411a-812f-ebc00953b582
@Jingxi-Polymaker
Jingxi-Polymaker marked this pull request as ready for review September 10, 2026 08:22
@Jingxi-Polymaker
Jingxi-Polymaker merged commit 5ef3f63 into main Sep 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant